1. Field of the Invention
The present invention relates generally to an analog/digital converter, and more particularly to an analog/digital converter, which compares an input analog signal to an output of a digital/analog converter, controls the digital/analog converter so that a difference between the input analog signal and the output of the digital/analog converter, and outputs a resultant of the input of the digital/analog converter through a low-pass filter.
2. Description of the Related Art
When the charge and discharge of a rechargeable battery used in a portable device, such as a cellular phone, is controlled, charge and discharge currents of the rechargeable battery are measured and the charge and discharge are controlled based on the measured values. Since an integral value of the current is important when a current is measured, it is preferable that the current value be continuously measured, not a time-discretely. In addition, since a discharge current generally changes abruptly, an analog/digital (A/D) converter with an enough speed is required. A xcex94xcexa3-type A/D converter is suitable as an A/D converter that satisfies the above requirements. In general, an A/D converter operates in synchronism with a clock pulse signal of a constant frequency. The frequency of a clock pulse signal of the xcex94xcexa3-type A/D converter is at least 100 times the bandwidth of the signal, for example, about 1 MHz in audio equipment.
Power consumption of the internal circuits of a portable device using a rechargeable battery is required to be low. Accordingly, power consumption of the various circuits necessary to constitute a circuit for measuring the charge and discharge current is also required to be low. For this purpose, the clock frequency may be limited to a low value, for example, 32.768 kHz.
As described above, an A/D converter operates synchronously to a clock pulse. Therefore, if the clock pulse is restricted to a low frequency, the A/D converter cannot operate at high speed and the current value cannot be measured continuously.
According to a first aspect of the present invention, there is provided a method for controlling analog/digital converter circuitry, comprising: generating a digital signal by accumulating a predetermined increment at a predetermined time interval in accordance with a value of a first analog signal input to the analog/digital converter; converting the digital signal to a second analog signal; subtracting the second analog signal from the first analog signal and generating a detection signal in accordance with a subtraction result; selecting one of accumulation modes in accordance with the detection signal; and accumulating at the time interval and in the increment in accordance with the selected accumulation mode.
According to a second aspect of the present invention, there is provided analog/digital converter comprising: error detecting circuits having a first input terminal and a second input terminal, the first input terminal supplied with a first analog signal and the second input terminal supplied with a second analog signal; detecting circuits supplied with an output signal of the error detecting circuits; controlling circuits, supplied with an output signal of the detecting circuits, selecting one of accumulation modes determined in accordance with the output signal of the detecting circuits and accumulating at a time interval and in an increment in accordance with the selected accumulation mode; and a digital/analog converter, supplied with an output signal of the controlling circuits and converting the output signal of the controlling circuits to the second analog signal.